package com.mapforge.map.tools.selection;

import java.awt.Point;
import java.awt.Rectangle;

import com.mapforge.selection.ContinuousSelection;
import com.mapforge.selection.Selection;

public class SingleColumnSelectionTool extends AbstractSelectionTool {

	public SingleColumnSelectionTool() {
		super("Selection Single Column");
	}

	@Override
	public void performEdit() {
		this.makeSelection();
	}

	@Override
	public Selection performSelection(Point anchorPoint, Point movingPoint) {
		return new ContinuousSelection(new Rectangle(movingPoint.x, 0, 1,
				getTileMap().getTotalVerticalTiles() - 1));
	}
}